import request from "./htttp2";

// 	 * 光伏系统----获取单位下光伏设备类型树 /photovoltaic /photovoltaic
export function findTreeForUnit (params) { 
    return request({
      url: "/photovoltaic/devices/findTreeForUnit",
      method: "get",
      params
  
    });
}

// 	 * 光伏系统----设备配置 /photovoltaic /photovoltaic
export function saveConfiguration (params) {
    return request({
      url: "/photovoltaic/devices/configuration",
      method: "post",
      headers: {
        'Content-Type': 'application/json',
        'Accept': '*/*'
      },
      data: params
  
    });
}

//* 光伏系统----根据单位id和类型编码获取设备列表 photovoltaic
export function findPhotovoltaicDevice (params) {
    return request({
      url: "/photovoltaic/devices/findPhotovoltaicDevice",
      method: "get",
      params
    });
}

//* 光伏系统----移除设备配置 /photovoltaic
export function removeDevices (params) {
    return request({
      url: "/photovoltaic/devices/remove",
      method: "delete",
      params
    });
}

//* 设备类型->查询全部配置
export function getAllDeviceTypeConfig () {
  return request({
    url: "/deviceType/getAllConfig",
    method: "POST",
  });
}
//* 设备类型->保存全部配置
export function saveAllDeviceTypeConfig (params) {
  return request({
    url: "/deviceType/saveConfig",
    method: "POST",
    data:params
  });
}
//* 设备类型->查询全部启用配置
export function getAllDeviceTypeConfigqiyong () {
  return request({
    url: "/deviceType/getConfig",
    method: "POST",
  });
}